export interface Tag {
  tags: string[];
}

export interface Articles {
  articles: Article[];
  articlesCount: number;
}

export interface ArticleDetail {
  article: Article;
}

export interface Article {
  slug: string;
  title: string;
  description: string;
  body?: string;
  tagList: string[];
  createdAt: string;
  updatedAt: string;
  favorited: boolean;
  favoritesCount: number;
  author: Author;
}
export interface Author {
  username: string;
  bio: string;
  image: string;
  following: boolean;
}

export interface CreateArticleInfo {
  article: CreateArticle;
}
interface CreateArticle {
  title: string;
  description: string;
  body: string;
  tagList: string[];
}

export interface UserReg {
  user: User_Req;
}
export interface UserLogin {
  user: User_Req;
}
interface User_Req {
  username?: string;
  email: string;
  password: string;
}

export interface User_Rsp {
  user: UserInfo;
}
export interface UserInfo {
  email: string;
  token: string;
  username: string;
  bio: string;
  image?: any;
}
export interface SingleComment {
  comment: Comment;
}
export interface MultComments {
  comments: Comment[];
}

export interface Comment {
  id: number;
  createdAt: string;
  updatedAt: string;
  body: string;
  author: Author;
}
export interface AddCommentInfo {
  comment: addComment;
}
interface addComment {
  body: string;
}